package com.yunbiao.ybboardapi.rotatescreen;

import android.content.Context;
import android.text.TextUtils;

import com.ys.rkapi.MyManager;
import com.yunbiao.ybboardapi.action.SLX560Action;

/***
 * 屏幕旋转管理类
 */
public class RotateScreenManager {
    private static RotateScreenManager rotateScreenManager;
    private RotateScreenManager(){}
    public static RotateScreenManager getInstance(){
        if (rotateScreenManager==null){
            rotateScreenManager=new RotateScreenManager();
        }
        return rotateScreenManager;
    }

    /**
     * 亿晟
     * @param context
     * @param rotate
     */
    public void rotateScreenYiSheng(Context context,int rotate){
        if (context==null|| !(rotate==0||rotate==180||rotate==90||rotate==270)) return;
        MyManager myManager = MyManager.getInstance(context);
        if (myManager!=null){
            myManager.rotateScreen(context,String.valueOf(rotate));
        }
    }

    /**
     * 施乐讯560
     * @param context
     * @param rotate
     */
    public void rotateScreenSLX560(Context context,int rotate){
        SLX560Action.getInstance().screenRotate(context,rotate);
    }
}
